package com.etrans.web.gps.common.filter;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;

public class InterfaceFilter  implements Filter{

	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
		
	}

	@Override
	public void doFilter(ServletRequest _request, ServletResponse _response,FilterChain filterChain) throws IOException, ServletException {
		
        HttpServletResponse response = (HttpServletResponse) _response;
        response.setHeader("Access-Control-Allow-Origin", "*");
        filterChain.doFilter(_request, response);
	}

	@Override
	public void destroy() {
		
	}

}
